// ZAManagerDlg.h : header file
//

#if !defined(AFX_ZAMANAGERDLG_H__0512DB5D_D2BF_473F_8310_5FA0B106AB59__INCLUDED_)
#define AFX_ZAMANAGERDLG_H__0512DB5D_D2BF_473F_8310_5FA0B106AB59__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "I_ZAManager.h"
#include "vector"
#include "afxmt.h"

/////////////////////////////////////////////////////////////////////////////
// CZAManagerDlg dialog

class CZAManagerDlg : public CDialog
{
// Construction
public:
	CZAManagerDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CZAManagerDlg)
	enum { IDD = IDD_ZAMANAGER_DIALOG };
	CListCtrl	m_lstResult;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CZAManagerDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CZAManagerDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	virtual void OnOK();
	afx_msg void OnDestroy();
	afx_msg void OnBtnInit();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	static DWORD WINAPI _ThreadProc_Task(LPVOID lpParameter);
	static BOOL _OnAddLog (LPCWSTR lpszLog, void* pContext);
	BOOL OnAddLog (LPCWSTR lpszLog);

private:
	void DoCmd(UINT nCmd);
	void OnCmd(UINT nCmd);
	void OnUpdateResult();

private:
	I_ZAManager* m_pZAManager;

	HANDLE m_hThread;
	HANDLE m_hEventQuit;
	HANDLE m_hSemaphoreCommand;

	CCriticalSection m_cs;
	std::list<UINT> m_lsCmd;

private:
	PZAMANAGERWEBSITEINFO m_pArr;
	UINT m_nCount;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ZAMANAGERDLG_H__0512DB5D_D2BF_473F_8310_5FA0B106AB59__INCLUDED_)
